﻿using Arc.DairyMan.DairyMan.BusinessLogic;
using Arc.DairyMan.DairyMan.Common;
using Arc.WinForms.Controls;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Arc.DairyMan.DairyMan.UI
{
    public partial class frmSabhasadReport : ArcForm
    {
        public frmSabhasadReport()
        {
            InitializeComponent();
        }

        private void btnClose_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        private void frmSabhasadReport_Load(object sender, EventArgs e)
        {
            blSabhasad _blSabhasad = new blSabhasad();
            _blSabhasad.DS = new DataSet();
            _blSabhasad.Search(string.Empty);

            _blSabhasad.DS.Tables["Sabhasad"].Columns.Add("Milk Type", typeof(string), "iif(MilkType = 1, 'Cow',iif(MilkType = 2,'Buffalo','Mix'))");

            grdReport.DataSource = _blSabhasad.DS.Tables["Sabhasad"].DefaultView.ToTable(false,"Code","Name","IsMember","Milk Type", "ContactNo","Address");

            //Code, Name, Is Member, Milk Type, Phone number, Address
        }
    }
}
